package com.lian.community.entity.user;

import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

/**
 * 为每一个访问服务器的用户提供一个独立线程
 */
@Component
public class HostUser {

    private ThreadLocal<Map<String,Object>> users = new ThreadLocal<>();


    public void setValue(Map<String, Object> value){
        users.set(value);
    }

    public Map<String, Object> getValue(){
        return users.get();
    }

    public void remove(){
        users.remove();
    }

}

